import request from '/@/utils/request.ts';

export function getSysRoleList(params: object) {
	return request({
		url: 'core/sysRole/page',
		method: 'get',
		params,
	});
}

export function addSysRole(data: object) {
	return request({
		url: 'core/sysRole/',
		method: 'POST',
		data: data,
	});
}

export function getSysRoleInfo(roleId: any) {
	return request({
		url: `core/sysRole/${roleId}`,
		method: 'GET',
	});
}

export function editSysRole(data: object, roleId: any) {
	return request({
		url: `core/sysRole/${roleId}`,
		method: 'PUT',
		data: data,
	});
}

export function delSysRole(roleId: any) {
	return request({
		url: `core/sysRole/${roleId}`,
		method: 'DELETE',
	});
}
